import http from '@/config/axios'

// 诊断改进
const improveUrl = '/v1/pc/api/indexQualityPointInfo';
// 1.04 查询诊断分析目标质控点统计信息
export const getMonitorInfo = data => http.get(`${improveUrl}/queryIndexQualityMonitorInfo`, { params: data });
// 3.03 关闭预警
export const updateWarningState = data => http.patch(`${improveUrl}/updateWarningState`, data);
// 1.03 未达标指标列表、未完成目标列表、预警信息记录表
export const getPointAll = data => http.get(`${improveUrl}/queryAll`, { params: data });
// 1.07 根据年份和整改对象id查询目标标准列表
export const getTargetByYear = data => http.get('/v1/pc/api/targetStandard/queryTargetStandardListByYearAndObjectId', { params: data });
// 1.08 根据整改范围id查询目标标准列表（只取当年）
export const getTargetByObject = data => http.get('/v1/pc/api/targetStandard/queryTargetStandardListByRangeId', { params: data });
// 1.05 查询目标标准完成情况纵向或者横向对比结果
export const getComparePointData = data => http.get('/v1/pc/api/indexQualityPointInfo/queryContrastIndexQualityInfo', { params: data });

// materialManagement : 材料管理表相关操作接口
// 5.01 多文件上传
export const fileUpload = data =>
    http({
        url: '/v1/pc/api/materialManagement/fileUpload',
        data,
        method: 'post',
        headers: { 'content-type': 'multipart/form-data' }
    });

// 1.02 分页查询
export const materialManagement = params =>
    http({
        url: '/v1/pc/api/materialManagement',
        method: 'get',
        params
    });

// 4.01 删除数据
export const materialManagementDel = id =>
    http({
        url: `/v1/pc/api/materialManagement/${id}`,
        method: 'delete'
    });

// 4.02 批量删除数据
export const deleteBatch = data =>
    http({
        url: '/v1/pc/api/materialManagement/deleteBatch',
        method: 'delete',
        data
    });
